package com.cc.entity;

import java.util.ArrayList;
import java.util.List;

public class Content {
	private int type;
	private int index;
	private Object choosen;
	private String answer;
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public int getIndex() {
		return index;
	}
	public void setIndex(int index) {
		this.index = index;
	}
	public List<Integer> getChoosen() {
		List<Integer> result=new ArrayList<>();
		if(this.choosen instanceof Integer)
		result.add((Integer)this.choosen);
		else if(this.choosen instanceof List<?>)
		result.addAll((List<Integer>)this.choosen);	
		return result;
	}
	public void setChoosen(Object choosen) {
		this.choosen = choosen;
	}
	public String getAnswer() {
		return answer;
	}
	public void setAnswer(String answer) {
		this.answer = answer;
	}

}
